Create or Update Asset Spatial Data
Introduction
Assetic is able to record the spatial location of an asset.
The spatial location information simplifies locating the asset within mapping applications such as Google Maps and it also enables Assetic to provide advanced spatial operations such as searching for assets within the radius of a point. The source of the spatial location data usually originates from a Geographic Information System (GIS) used within an organisation.
PUT /api/v2/assets/{id}/location
The Assetic REST API endpoint PUT /api/v2/assets/{id}/location may be used to create/update the spatial record for the given asset, where {id} is the Assetic asset internal GUID.
This API endpoint differs from most of the other Assetic REST API endpoints which have a separate POST endpoint to create a record, and a PUT endpoint to update a record. Instead, this single endpoint is used for both requests.
The payload for this API is in GeoJSON format, and has an outer object named "Data" within which there are 3 members:
Name | Value | Description | Allow Null |
type | Feature | The GeoJSON 'Type'. Use 'Feature' | No |
geometry | GeometryCollection | The GeoJSON 'Geometry Type'. Use 'GeometryCollection' | Yes |
properties | object |
Set to null. If the asset has an address record it will return the object "AssetPhysicalLocation" which contains the address detail of the asset. |
Yes |
An example payload is shown below:
{
"Data": {
"type": "Feature",
"geometry": {
"type": "GeometryCollection",
"geometries": [{
"type": "Point",
"coordinates": [144.95545327663422,
-37.818679315562655]
}]
},
"properties": null
}
}
}